package com.dream.wukong.bigdata.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ImportResource;

import java.io.IOException;

/**
 * @Author: wuyichao
 * @Description:
 * @Date: Created in 17:03 2018/9/27.
 * @Modified:
 */
@SpringBootApplication
@ImportResource({"classpath:hadoop.xml"})
public class SpringHadoopApp {

    public static void main(String[] args) throws Exception {

        ApplicationContext applicationContext= SpringApplication.run(SpringHadoopApp.class,args);
//        FileSystem fileSystem = applicationContext.getBean("fileSystem",FileSystem.class);
//
//        try {
//            fileSystem.mkdirs(new Path("/SpringHDFS/"));
//        } catch (IOException e) {
//            e.printStackTrace();
//        }

        try {
            new WordCount().job();
        } catch (IOException e) {
            e.printStackTrace();
        }

//        ToolRunner.run(new WordCountNew(), args);

    }

}
